home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 83 / MacAddict_083_2003-07.iso / mac / Software / Development / VLC Source 0.5.3.dmg / include / codecs.h < prev    next >
C/C++ Source or Header  |  2002-12-12  |  3KB  |  89 lines

  1. /*****************************************************************************
  2.  * codecs.h: codec related structures needed by the demuxers and decoders
  3.  *****************************************************************************
  4.  * Copyright (C) 1999-2001 VideoLAN
  5.  * $Id: codecs.h,v 1.3 2002/12/03 17:00:15 fenrir Exp $
  6.  *
  7.  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  *
  14.  * This program is distributed in the hope that it will be useful,
  15.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.  * GNU General Public License for more details.
  18.  *
  19.  * You should have received a copy of the GNU General Public License
  20.  * along with this program; if not, write to the Free Software
  21.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  22.  *****************************************************************************/
  23.  
  24. #ifndef _VLC_CODECS_H
  25. #define _VLC_CODECS_H 1
  26.  
  27. /* Structures exported to the demuxers and decoders */
  28.  
  29. #ifndef _WAVEFORMATEX_
  30. #define _WAVEFORMATEX_
  31. typedef struct __attribute__((__packed__)) _WAVEFORMATEX {
  32.     uint16_t   wFormatTag;
  33.     uint16_t   nChannels;
  34.     uint32_t   nSamplesPerSec;
  35.     uint32_t   nAvgBytesPerSec;
  36.     uint16_t   nBlockAlign;
  37.     uint16_t   wBitsPerSample;
  38.     uint16_t   cbSize;
  39. } WAVEFORMATEX, *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX;
  40. #endif /* _WAVEFORMATEX_ */
  41.  
  42. #if !defined(_BITMAPINFOHEADER_) && !defined(WIN32)
  43. #define _BITMAPINFOHEADER_
  44. typedef struct __attribute__((__packed__))
  45. {
  46.     uint32_t   biSize;
  47.     uint32_t   biWidth;
  48.     uint32_t   biHeight;
  49.     uint16_t   biPlanes;
  50.     uint16_t   biBitCount;
  51.     uint32_t   biCompression;
  52.     uint32_t   biSizeImage;
  53.     uint32_t   biXPelsPerMeter;
  54.     uint32_t   biYPelsPerMeter;
  55.     uint32_t   biClrUsed;
  56.     uint32_t   biClrImportant;
  57. } BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
  58. typedef struct {
  59.     BITMAPINFOHEADER bmiHeader;
  60.     int        bmiColors[1];
  61. } BITMAPINFO, *LPBITMAPINFO;
  62. #endif
  63.  
  64. /* WAVE form wFormatTag IDs */
  65.  
  66. #define  WAVE_FORMAT_UNKNOWN            0x0000 /* Microsoft Corporation */
  67. #define  WAVE_FORMAT_PCM                0x0001 /* Microsoft Corporation */
  68. #define  WAVE_FORMAT_ADPCM              0x0002 /* Microsoft Corporation */
  69. #define  WAVE_FORMAT_IEEE_FLOAT         0x0003 /* Microsoft Corporation */
  70. #define  WAVE_FORMAT_ALAW               0x0006 /* Microsoft Corporation */
  71. #define  WAVE_FORMAT_MULAW              0x0007 /* Microsoft Corporation */
  72. #define  WAVE_FORMAT_DTS                0x0008 /* Microsoft Corporation */
  73. #define  WAVE_FORMAT_IMA_ADPCM          0x0011
  74. #define  WAVE_FORMAT_MPEG               0x0050 /* Microsoft Corporation */
  75. #define  WAVE_FORMAT_MPEGLAYER3         0x0055 /* ISO/MPEG Layer3 Format Tag */
  76. #define  WAVE_FORMAT_DOLBY_AC3_SPDIF    0x0092 /* Sonic Foundry */
  77.  
  78. /* Need to check these */
  79. #define WAVE_FORMAT_A52             0x2000
  80. #define WAVE_FORMAT_WMA1            0x0160
  81. #define WAVE_FORMAT_WMA2            0x0161
  82. #define WAVE_FORMAT_WMA3            0x0162
  83.  
  84. #if !defined(WAVE_FORMAT_EXTENSIBLE)
  85. #define  WAVE_FORMAT_EXTENSIBLE                 0xFFFE /* Microsoft */
  86. #endif
  87.  
  88. #endif /* "codecs.h" */
  89.